.class Lcom/kwad/sdk/api/loader/Api$UpdateData;
.super Ljava/lang/Object;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/kwad/sdk/api/loader/Api;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "UpdateData"
.end annotation


# instance fields
.field data:Lcom/kwad/sdk/api/loader/Api$Data;

.field errorMsg:Ljava/lang/String;

.field result:J


# direct methods
.method constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method isLegal()Z
    .locals 5

    iget-wide v0, p0, Lcom/kwad/sdk/api/loader/Api$UpdateData;->result:J

    const-wide/16 v2, 0x1

    cmp-long v4, v0, v2

    if-nez v4, :cond_0

    iget-object v0, p0, Lcom/kwad/sdk/api/loader/Api$UpdateData;->data:Lcom/kwad/sdk/api/loader/Api$Data;

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method public parseJson(Lorg/json/JSONObject;)V
    .locals 2

    if-nez p1, :cond_0

    return-void

    :cond_0
    const-string v0, "result"

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optLong(Ljava/lang/String;)J

    move-result-wide v0

    iput-wide v0, p0, Lcom/kwad/sdk/api/loader/Api$UpdateData;->result:J

    const-string v0, "errorMsg"

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/kwad/sdk/api/loader/Api$UpdateData;->errorMsg:Ljava/lang/String;

    new-instance v0, Lcom/kwad/sdk/api/loader/Api$Data;

    invoke-direct {v0}, Lcom/kwad/sdk/api/loader/Api$Data;-><init>()V

    iput-object v0, p0, Lcom/kwad/sdk/api/loader/Api$UpdateData;->data:Lcom/kwad/sdk/api/loader/Api$Data;

    const-string v1, "data"

    invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object p1

    invoke-virtual {v0, p1}, Lcom/kwad/sdk/api/loader/Api$Data;->parseJson(Lorg/json/JSONObject;)V

    return-void
.end method
